library(Synth)
library(tidyverse)
setwd("/root/capsule/")
## Setup -----------------------------------------------------------------------
library(parallel)
n.cores = detectCores()
library(dplyr)
library(magrittr)
library(ggplot2)
library(furrr)
plan(multisession, workers = n.cores)
options(future.rng.onMisuse="ignore")
options(stringsAsFactors = FALSE)
source("./code/utility/misc.R")
source("./code/utility/TFDTW.R")
source("./code/utility/synth.R")
source("./code/utility/implement.R")
source("./code/utility/grid.search.R")
set.seed(20220407)
## Placebo Test -------------------------------------------------------------
fig_basque = readRDS("./data/Figure_5_1.Rds")
fig_tobacco = readRDS("./data/Figure_5_2.Rds")
fig_germany = readRDS("./data/Figure_5_3.Rds")
fig_all = ggpubr::ggarrange(fig_basque + ggpubr::rremove("ylab") +
ggpubr::rremove("xlab"),
fig_tobacco + ggpubr::rremove("ylab") +
ggpubr::rremove("xlab"),
fig_germany + ggpubr::rremove("ylab") +
ggpubr::rremove("xlab"),
labels = c("Basque Terrorism",
"California Tobacco",
"German Reunification"),
label.x = 0.1,
label.y = 0.9,
hjust = c(0, 0, 0),
font.label = list(size = 16, color = "grey20",
face = "bold"),
ncol = 1, nrow = 3,
align = "hv")
rlang::last_trace()
remove.packages("ggplot2")
library(ggplot2)
library(ggplot2)
install.packages("devtools")
setwd("/root/capsule/")
source("./code/utility/Figure_5_all.R")
install.packages("scales")
install.packages("scales")
